﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DbManager.Objects
{
    public class SqlField :
        SqlObject
    {
        public SqlField(String name) : base(name) { }

        #region Public Properties

        public bool IsPrimaryKey { get; set; }
        public bool Nullable { get; set; }
        public SqlFieldType FieldType { get; set; }

        #endregion


        #region Overrides

        protected override void Init()
        {
            IsPrimaryKey = false;
            Nullable = true;
        }

        public override bool CanBeNull()
        {
            return Nullable;
        }

        #endregion 
    }
}
